<?php
 define('IN_DAEM', true); include_once '../init/global.php'; require_once("../init/db_oracle.php"); $ociHost = '10.1.18.213'; $ociDb['host'] = $ociHost.'/jcdoc'; $ociDb['name'] = 'kudian'; $ociDb['pass'] = 'greeic2012tw'; $db2 = new db2(); $db2->connect($ociDb); function getFileRoad($bianma){ global $db2; $dataPath = "http://10.163.163.160/servlet/fileservlet/zlfile/"; $sql = "select t.FILENAME from beizhu t where (t.bianma='".$bianma."' or t.bianma like '".$bianma.";%' or t.bianma like '%;".$bianma."'or t.bianma like '%;".$bianma.";%') and t.neworold='new' "; $query = $db2->query($sql); $count = 0; while($row = $db2->fetch_array($query)) { $row['FILENAME'] = trim($row['FILENAME']); $fileName = $row['FILENAME']."/1"; $count++; } if($count == 1) { return $dataPath.$fileName; } else return "no"; } $server = new SoapServer("basicDocument.wsdl"); $server->addFunction("getFileRoad"); $server->handle (); 